This repository has been archived by the owner on Jul 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package name com.metanorma renamed to org.metanorma
- Loading branch information
1 parent
24905a9
commit ebbacbd
Showing
20 changed files
with
853 additions
and
851 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/com/metanorma/Constants.java → src/main/java/org/metanorma/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.metanorma; | ||
package org.metanorma; | ||
|
||
/** | ||
* | ||
|
210 changes: 105 additions & 105 deletions
210
src/main/java/com/metanorma/LSInputImpl.java → src/main/java/org/metanorma/LSInputImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,106 @@ | ||
package com.metanorma; | ||
|
||
import com.metanorma.utils.LoggerHelper; | ||
import java.io.BufferedInputStream; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.io.Reader; | ||
import java.util.logging.Level; | ||
import java.util.logging.Logger; | ||
import org.w3c.dom.ls.LSInput; | ||
|
||
|
||
public class LSInputImpl implements LSInput { | ||
|
||
private static final Logger logger = Logger.getLogger(LoggerHelper.LOGGER_NAME); | ||
|
||
private String publicId; | ||
|
||
private String systemId; | ||
|
||
public String getPublicId() { | ||
return publicId; | ||
} | ||
|
||
public void setPublicId(String publicId) { | ||
this.publicId = publicId; | ||
} | ||
|
||
public String getBaseURI() { | ||
return null; | ||
} | ||
|
||
public InputStream getByteStream() { | ||
return null; | ||
} | ||
|
||
public boolean getCertifiedText() { | ||
return false; | ||
} | ||
|
||
public Reader getCharacterStream() { | ||
return null; | ||
} | ||
|
||
public String getEncoding() { | ||
return null; | ||
} | ||
|
||
public String getStringData() { | ||
synchronized (inputStream) { | ||
try { | ||
byte[] input = new byte[inputStream.available()]; | ||
inputStream.read(input); | ||
String contents = new String(input); | ||
return contents; | ||
} catch (IOException e) { | ||
//e.printStackTrace(); | ||
//System.out.println("Exception " + e); | ||
logger.log(Level.INFO, "Exception {0}", e); | ||
return null; | ||
} | ||
} | ||
} | ||
|
||
public void setBaseURI(String baseURI) { | ||
} | ||
|
||
public void setByteStream(InputStream byteStream) { | ||
} | ||
|
||
public void setCertifiedText(boolean certifiedText) { | ||
} | ||
|
||
public void setCharacterStream(Reader characterStream) { | ||
} | ||
|
||
public void setEncoding(String encoding) { | ||
} | ||
|
||
public void setStringData(String stringData) { | ||
} | ||
|
||
public String getSystemId() { | ||
return systemId; | ||
} | ||
|
||
public void setSystemId(String systemId) { | ||
this.systemId = systemId; | ||
} | ||
|
||
public BufferedInputStream getInputStream() { | ||
return inputStream; | ||
} | ||
|
||
public void setInputStream(BufferedInputStream inputStream) { | ||
this.inputStream = inputStream; | ||
} | ||
|
||
private BufferedInputStream inputStream; | ||
|
||
public LSInputImpl(String publicId, String sysId, InputStream input) { | ||
this.publicId = publicId; | ||
this.systemId = sysId; | ||
this.inputStream = new BufferedInputStream(input); | ||
} | ||
package org.metanorma; | ||
|
||
import org.metanorma.utils.LoggerHelper; | ||
import java.io.BufferedInputStream; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.io.Reader; | ||
import java.util.logging.Level; | ||
import java.util.logging.Logger; | ||
import org.w3c.dom.ls.LSInput; | ||
|
||
|
||
public class LSInputImpl implements LSInput { | ||
|
||
private static final Logger logger = Logger.getLogger(LoggerHelper.LOGGER_NAME); | ||
|
||
private String publicId; | ||
|
||
private String systemId; | ||
|
||
public String getPublicId() { | ||
return publicId; | ||
} | ||
|
||
public void setPublicId(String publicId) { | ||
this.publicId = publicId; | ||
} | ||
|
||
public String getBaseURI() { | ||
return null; | ||
} | ||
|
||
public InputStream getByteStream() { | ||
return null; | ||
} | ||
|
||
public boolean getCertifiedText() { | ||
return false; | ||
} | ||
|
||
public Reader getCharacterStream() { | ||
return null; | ||
} | ||
|
||
public String getEncoding() { | ||
return null; | ||
} | ||
|
||
public String getStringData() { | ||
synchronized (inputStream) { | ||
try { | ||
byte[] input = new byte[inputStream.available()]; | ||
inputStream.read(input); | ||
String contents = new String(input); | ||
return contents; | ||
} catch (IOException e) { | ||
//e.printStackTrace(); | ||
//System.out.println("Exception " + e); | ||
logger.log(Level.INFO, "Exception {0}", e); | ||
return null; | ||
} | ||
} | ||
} | ||
|
||
public void setBaseURI(String baseURI) { | ||
} | ||
|
||
public void setByteStream(InputStream byteStream) { | ||
} | ||
|
||
public void setCertifiedText(boolean certifiedText) { | ||
} | ||
|
||
public void setCharacterStream(Reader characterStream) { | ||
} | ||
|
||
public void setEncoding(String encoding) { | ||
} | ||
|
||
public void setStringData(String stringData) { | ||
} | ||
|
||
public String getSystemId() { | ||
return systemId; | ||
} | ||
|
||
public void setSystemId(String systemId) { | ||
this.systemId = systemId; | ||
} | ||
|
||
public BufferedInputStream getInputStream() { | ||
return inputStream; | ||
} | ||
|
||
public void setInputStream(BufferedInputStream inputStream) { | ||
this.inputStream = inputStream; | ||
} | ||
|
||
private BufferedInputStream inputStream; | ||
|
||
public LSInputImpl(String publicId, String sysId, InputStream input) { | ||
this.publicId = publicId; | ||
this.systemId = sysId; | ||
this.inputStream = new BufferedInputStream(input); | ||
} | ||
} |
12 changes: 6 additions & 6 deletions
12
.../java/com/metanorma/OutputFormatEnum.java → .../java/org/metanorma/OutputFormatEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package com.metanorma; | ||
|
||
|
||
public enum OutputFormatEnum { | ||
NISO, ISO | ||
} | ||
package org.metanorma; | ||
|
||
|
||
public enum OutputFormatEnum { | ||
NISO, ISO | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/java/com/metanorma/RegExHelper.java → src/main/java/org/metanorma/RegExHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.metanorma; | ||
package org.metanorma; | ||
|
||
import java.util.regex.Matcher; | ||
import java.util.regex.Pattern; | ||
|
Oops, something went wrong.