- From: Jonathan Barouh via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 17 Jun 2008 13:45:34 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/org/w3c/unicorn/tasklist
In directory hutz:/tmp/cvs-serv14031/org/w3c/unicorn/tasklist
Modified Files:
TasksListUnmarshallerJAXB.java RDFUnmarshallerJena.java
Observation.java
Log Message:
Updating Javadoc for the project.
Index: RDFUnmarshallerJena.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tasklist/RDFUnmarshallerJena.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- RDFUnmarshallerJena.java 31 Aug 2006 09:09:26 -0000 1.1.1.1
+++ RDFUnmarshallerJena.java 17 Jun 2008 13:45:32 -0000 1.2
@@ -85,11 +85,19 @@
private Map<String, Task> mapOfTask = null;
private Model aModel = null;
+ /**
+ * Default constructor.
+ *
+ */
public RDFUnmarshallerJena () {
RDFUnmarshallerJena.logger.trace("Constructor");
this.aModel = ModelFactory.createDefaultModel();
}
+ /**
+ * Adds a Model with the given URL to this aModel.
+ * @param aURL The URL to add.
+ */
public void addURL (final URL aURL) throws IOException {
RDFUnmarshallerJena.logger.trace("addURL");
if (RDFUnmarshallerJena.logger.isDebugEnabled()) {
@@ -100,6 +108,11 @@
this.aModel.add(aModel);
}
+ /**
+ * Adds a name (with its language) to the given task.
+ * @param aTask The task to name.
+ * @param aLiteral The name of the task.
+ */
private void addLongName (final Task aTask, final Literal aLiteral) {
RDFUnmarshallerJena.logger.debug(
"LongName lang:" + aLiteral.getLanguage() +
@@ -107,6 +120,11 @@
aTask.addLongName(aLiteral.getLanguage(), aLiteral.getString());
}
+ /**
+ * Adds a description (with its language) to the given task.
+ * @param aTask The task to describe.
+ * @param aLiteral The description of the task.
+ */
private void addDescription (final Task aTask, final Literal aLiteral) {
RDFUnmarshallerJena.logger.debug(
"Description lang:" + aLiteral.getLanguage() +
@@ -114,6 +132,11 @@
aTask.addDescription(aLiteral.getLanguage(), aLiteral.getString());
}
+ /**
+ * Adds a name (with its language) to the given parameter.
+ * @param aTask The parameter to name.
+ * @param aLiteral The name of the parameter.
+ */
private void addLongName (final Parameter aParameter, final Literal aLiteral) {
RDFUnmarshallerJena.logger.debug(
"Parameter long name lang:" + aLiteral.getLanguage() +
@@ -121,6 +144,11 @@
aParameter.addLongName(aLiteral.getLanguage(), aLiteral.getString());
}
+ /**
+ * Adds a name (with its language) to the given value.
+ * @param aTask The value to name.
+ * @param aLiteral The name of the value.
+ */
private void addLongName (final Value aValue, final Literal aLiteral) {
RDFUnmarshallerJena.logger.debug(
"Value long name lang:" + aLiteral.getLanguage() +
@@ -128,6 +156,11 @@
aValue.addLongName(aLiteral.getLanguage(), aLiteral.getString());
}
+ /**
+ * Adds a mapping to the given value.
+ * @param value The value to map.
+ * @param aMapping The mapping for the value.
+ */
private void addMapping (final Value aValue, final Resource aMapping) {
RDFUnmarshallerJena.logger.trace("addMapping");
if (RDFUnmarshallerJena.logger.isDebugEnabled()) {
@@ -144,6 +177,11 @@
oMapping.setValue(sValue);
}
+ /**
+ * Adds a value to the given parameter.
+ * @param aParameter The parameter to consider.
+ * @param aValue The value to add.
+ */
private void addValue (final Parameter aParameter, final Resource aValue) {
final String sValue =
aValue.getProperty(RDFUnmarshallerJena.PROPERTY_VALUE).getLiteral().getString();
@@ -174,6 +212,11 @@
} // find and add mapping of the Value
}
+ /**
+ * Adds a parameter to the given task.
+ * @param aTask The task to consider.
+ * @param aParameter The parameter to add.
+ */
private void addParameter (final Task aTask, final Resource aParameter) {
final String sParameterReference =
aParameter.getProperty(RDFUnmarshallerJena.PROPERTY_REFERENCE).getLiteral().getString();
@@ -209,6 +252,12 @@
} // find and add value of the Parameter
}
+ /**
+ * Adds a handler to the given task.
+ * @param aTask The task to consider.
+ * @param aHandler The handler to add.
+ * @throws MimeTypeParseException
+ */
private void addHandler (final Task aTask, final Resource aHandler) throws MimeTypeParseException {
RDFUnmarshallerJena.logger.trace("addHandler");
final String sMimeType = aHandler.getProperty(RDFUnmarshallerJena.PROPERTY_MIMETYPE).getLiteral().getString();
@@ -225,6 +274,11 @@
TPriority.fromValue(sPriority));
}
+ /**
+ * Adds a task to this object.
+ * @param aTask The task to add.
+ * @throws Exception
+ */
private void addTask (final Resource aTask) throws Exception {
final Statement aReference = aTask.getProperty(RDFUnmarshallerJena.PROPERTY_REFERENCE);
final Task oTask = this.mapOfTask.get(aReference.getLiteral().getString());
Index: Observation.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tasklist/Observation.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Observation.java 31 Aug 2006 09:09:26 -0000 1.1.1.1
+++ Observation.java 17 Jun 2008 13:45:32 -0000 1.2
@@ -116,6 +116,12 @@
}
}
+ /**
+ * Parses the mapOfMimeTypePriority in order to check if the given type
+ * matches an existing one.
+ * @param aMimeType The type to check.
+ * @return True if the given type matches an existing one, else false.
+ */
public boolean allowMimeType (
final MimeType aMimeType) {
for (final MimeType aLocalMimeType : this.mapOfMimeTypePriority.keySet()) {
Index: TasksListUnmarshallerJAXB.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tasklist/TasksListUnmarshallerJAXB.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- TasksListUnmarshallerJAXB.java 31 Aug 2006 09:09:27 -0000 1.1.1.1
+++ TasksListUnmarshallerJAXB.java 17 Jun 2008 13:45:32 -0000 1.2
@@ -537,32 +537,6 @@
}
}
- /**
- * Main method used to test this class
- * @param args
- * @throws Exception
- *//*
- public static void main(String[] args) throws Exception {
- Map<String, Observer> observers = new LinkedHashMap<String, Observer>();
-
- Observer o = new Observer();
- observers.put("css-validator", o);
-
- Observer o2 = new Observer();
- observers.put("link-checker", o2);
- TasksListUnmarshaller tlu = new TasksListUnmarshallerJAXB(observers);
- tlu.addURL(new URL("http://w3cstag8/~jean/xml/task2.xml"));
- tlu.unmarshal();
-
- RDFUnmarshaller rdfu = new RDFUnmarshallerJena(tlu.getMapOfTask());
- rdfu.addURL(new URL("http://w3cstag8/~jean/xml/task.rdf"));
- rdfu.unmarshal();
-
- for (org.w3c.unicorn.tasklist.Task t : tlu.getMapOfTask().values()) {
- System.out.println(t);
- System.out.println("---------------------------------------");
- }
- }*/
}
Received on Tuesday, 17 June 2008 13:46:07 UTC